package com.masteringwave.views;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.http.*;

@SuppressWarnings("serial")
public class EmbedViewServlet extends HttpServlet {
	public void doGet(HttpServletRequest req, HttpServletResponse resp)
			throws IOException {
		resp.setContentType("application/xml");
		
		PrintWriter out= resp.getWriter();
		out.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
      +"<Module>"
      +"<ModulePrefs title=\"inline_external_page\" height=\"400\" width=\"800\"/>"
      +"<Content type=\"html\">"
      +"<![CDATA[ "
      +" <div id=\"main\"><!--Main container for the iframe-->"
      +" <iframe name=\"check\" id=\"check\" height=\"100%\" src =\""+(String)req.getParameter("url")+"\" width=\"100%\" frameborder=\"0\">"
		+"<p>Your browser does not support iframes .</p>"
		+"</iframe> <!-- this is where contents of the links are displayed -->"
		+"</div>"
		+"]]></Content>"
		+"</Module>");
	}
}
